# -*- coding:utf-8 -*-
# @Time :2025/3/6
import requests


class LoginApi:
    @classmethod
    # 获取验证码
    def get_code(cls, session):
        session.get('http://www.tpshop.com/index.php?m=Home&c=User&a=verify')

    # 登录
    @classmethod
    def login(cls, session, login_data):
        resp = session.post('http://www.tpshop.com/index.php?m=Home&c=User&a=do_login',data=login_data)
        return resp

